package com.example.java1mysql1.infrastructure;

import org.springframework.stereotype.Component;

import javax.annotation.Resource;
import java.util.Random;

@Component
public class RandomEx {
    private Random random = new Random();

    public synchronized String randomString(String suffix){
        String value = String.format("%06d",random.nextInt(99999));
        return "R"+suffix+value;
    }
    public Integer randomInteger(Integer a){
        return random.nextInt(a);
    }
}
